package com.rjjs.Xiaozhi.mapper;

import com.rjjs.Xiaozhi.entity.FoodPurchase;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface FoodPurchaseMapper {
    @Select("select * from food_purchase where type = #{type} order by upload_time desc")
    List<FoodPurchase> selectFoodPurchase(FoodPurchase foodPurchase);

    @Select("select count(*) from food_purchase where type = #{type} and state = #{state}")
    int selectFoodPurchaseCount(String type, int state);

    List<Integer> getCommodityWeek(String type, Integer state, String mondayOfMonth, String sundayOfMonth);
}
